From: Jan Beulich Date: Thu, 26 Feb 2015 12:58:54 +0000 (+0100) Subject: honor MEMF_no_refcount in alloc_heap_pages() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3716 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=17294e69c4cd299da7ba3ca8077e24be76bd61b1;p=xen.git honor MEMF_no_refcount in alloc_heap_pages() Non-anonymous allocations with this flag set should - for the purpose of the availability check - be treated just like anonymous ones, as they wouldn't lead to a reduction of ->outstanding_pages. Signed-off-by: Jan Beulich Reviewed-by: Tim Deegan --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 3c27af96ea..a7bdbfd956 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -617,7 +617,8 @@ static struct page_info *alloc_heap_pages( */ if ( (outstanding_claims + request > total_avail_pages + tmem_freeable_pages()) && - (d == NULL || d->outstanding_pages < request) ) + ((memflags & MEMF_no_refcount) || + !d || d->outstanding_pages < request) ) goto not_found; /*